<!DOCTYPE html>
<html>
<head>
<title>{$pname} - {$site_seo_title} </title>
<meta name="keywords" content="{$post_keywords}" />
<meta name="description" content="{$post_excerpt}">
<tc_include file="Public:head" />
<style>			
.ipt-txt {border: 1px solid #c0c0c0;height: 36px;line-height: 36px;padding: 0px 10px;width: 120px;font-size:14px;}
.ipt-btn {border: none;background: none repeat scroll 0% 0% #97C82A;font-size:14px;border-radius:3px;cursor: pointer;height: 38px;width: 90px;color: #fff;}
.result_box{border:1px solid #97C82A;padding:30px; margin-top: 30px;}
.result_box{ height: 120px; overflow: hidden; font-size: 16px;}
.result_box .avartar{ float: left; text-align: center; padding: 0 40px;}	
.info{ line-height:38px; float: left; padding-left: 20px;}		
#order_form{ line-height:40px; font-size:14px; margin: 30px 0px;}
.swap{ border:1px solid #97C82A; padding:20px; }
.swap form{ width: 550px; float: left;border-right: 1px solid #97C82A;}
.swap .notice{ float: left;font-size: 14px;color: #666; padding: 20px 40px;}
.swap .notice h2{ font-size: 18px; font-weight: bold;}
#fangshi span{ display:inline-block; padding:4px 20px; cursor:pointer; font-size: 16px; }
#fangshi span.active{ border:1px solid #97C82A;background:#97C82A; color:#fff; font-weight: bold;}
#order_form .line{ margin: 6px 0;}
#order_form .line span{ display: inline-block; width: 130px; text-align: right;}
#fk label{ display: inline-block; padding:0 20px; cursor:pointer}	
#fk label.active{ border: #97C75D solid 1px;  font-weight: bold;}
#order_form .btn_submit{  width: 150px; font-size: 16px;}
#done{ height: 320px; display: none;}
#done .status{ float: left; width: 50%; }
#done .status a{ display:block; width: 30%; border-radius: 5px; margin:40px auto; text-align: center; font-size: 16px; background: #45721D;color: #fff;  padding: 10px 20px; text-decoration: none;}
#done .status a:hover{ background:#89AD31; }
#done .status .txt{ margin:80px auto 0; width:300px; height:90px; background: url("/statics/images/done.png") left center no-repeat; }
#done .content{ float: right; width: 50%; height: 100%; }
#done .content .tel{ line-height:38px; margin: 20px 0; font-size:16px; color:#666;}
#done .content .code{border: 1px solid #d8d8d8; padding: 10px;  height: 140px; background: #f1f1f1;}
#done .content .code span{display: block; line-height:28px; height:100px; padding-top: 40px; background:url("/statics/images/weixin.png") left center no-repeat; padding-left: 160px;}
</style>
</head>
<body>
<tc_include file="Public:nav" />
<div class="container">	
    <div class="result_box bgf">
    	<div class="avartar" style="border-right: 1px solid #e6e6e6;"><img src="{:sp_get_asset_upload_path($avatar)}" alt="{$pname}" height="120" /> <p>{$pname}</p></div>
    	<div class="info" style="border-right: 1px solid #e6e6e6;height: 145px;width: 100px;">
    		<p>评估保价:</p>
			<p style="color: #FF0000;">￥{$order_price}</p>
    		<p><a style="background: #f00;color: #fff;padding: 6px;border-radius: 7px;" href="{:U("/item/$id")}">重新估价</a></p>
    	</div>
		<div style="border-right: 1px solid #e6e6e6;">
			{$order_json}
		<!-- <script> -->
			<!-- var json = {”name”:”冯娟”,”password”:”123456″,”department”:”技术部”,”sex”:” 女”,”old”:30}; -->
			<!-- for(var p in json){ -->
				<!-- str = str+obj[p]+','; -->
				 <!-- alert(str); -->
			<!-- } -->
		<!-- </script> -->
		</div>
    </div>
    <div id="order_form" class="bgf">
        <div id="fangshi">
        	<span for="youji" class="active">快递邮寄</span>
			<span for="shangmen">上门回收</span>
			<span for="zhuyi">注意事项</span>
        </div>
        <div id="shangmen" class="swap" style="display: none;"><form id="shangmenform" action="/product/submit_shangmen" method="post">
        	<input type="hidden" name="order_price" value="{$order_price}">
            <input type="hidden" name="order_json" value="{$order_json}">
            <input type="hidden" name="order_pname" value="{$pname}">
            <div class="line"><span>姓名：</span><input type="text" class="ipt-txt username" name="username"/></div>   
        	<div class="line"><span>地址：</span><input type="text" class="ipt-txt address" name="address" style="width:212px" /></div>   
            <div class="line"><span>手机号：</span><input type="text" class="ipt-txt mobile" placeholder="请输入手机号码" name="mobile" /> <input type="button" id="code" class="ipt-btn" value="获取验证码" /></div>
            <div class="line"><span>验证码：</span><input type="text" class="ipt-txt rancode" maxlength="6" name="rancode" /></div>
            <div class="line t-a-c" style="width:340px;"><input type="submit" class="ipt-btn btn_submit" value="提交订单"></div></form>	     
        	<div class="notice">
    			<h2>上门交易客户注意事项：</h2>
				<p>1、请携带个人身份证、发票、原装盒子及配件；</p>
				<p>2、请按约定时间在约定地点进行质检及交易；</p>
				<p>3、请在交易之前保存和清空个人资料；</p>
        	</div>
        	<div class="clear"></div>
        </div>
        <div id="youji" class="swap">
        	<form id="youjiform" action="/product/submit_youji" method="post">
        	<input type="hidden" class="pay_method" name="pay_method" />
        	<input type="hidden" name="order_price" value="{$order_price}">
            <input type="hidden" name="order_json" value="{$order_json}">
            <input type="hidden" name="order_pname" value="{$pname}">
            <div class="line"><span>姓名：</span><input type="text" class="ipt-txt username" name="username"/></div>    
            <div class="line"><span>手机号：</span><input type="text" class="ipt-txt mobile" name="mobile" /></div>	   
            <div class="line" id="fk"><span>收款方式：</span><label for="alipay" class="icon active">支付宝</label><label for="unionpay" class="icon">网银</label></div>
        	<div id="alipay" class="payway">	            		
        		<div class="line"><span>支付宝账户：</span><input type="text" class="ipt-txt alicard" name="alicard" style="width: 212px;"/></div>
        		<div class="line"><span>支付宝真实姓名：</span><input type="text" class="ipt-txt aliname" name="aliname"/></div>
        	</div>
        	<div id="unionpay" class="payway" style="display: none;">
        		<div class="line"><span>网银账户：</span><input type="text" class="ipt-txt unioncard" name="unioncard" style="width: 212px;"/></div>
        		<div class="line"><span>网银开户姓名：</span><input type="text" class="ipt-txt unionname" name="unionname"/></div>            		
        	</div>
            <div class="line"><span>验证码：</span><input type="text" class="ipt-txt rancode" maxlength="6" name="rancode" />
            	{:sp_verifycode_img('code_len=4&font_size=15&width=100&height=35&charset=1234567890')}            	
            </div>
            <div class="line t-a-c" style="width:340px;"><input type="submit" class="ipt-btn btn_submit" value="提交订单"></div></form>
            <div class="notice">
    			<h2>网络客户注意事项：</h2>
				<p>1、邮寄手机请务必选择顺丰速运http://www.sf-express.com/cn/sc/</p>
				<p>2、邮寄之前保存和清空个人资料；</p>
				<p>3、邮寄后提交快递单号以便查询；</p>
				<p>4、客服收货后电话确认质检详情，请保持手机畅通；</p>
				<p>5、交易成功请及时查询收款，确认订单完成。</p>
        	</div>
        	<div class="clear"></div>
        </div>
		<div id="zhuyi" class="swap" style="display: none;">  
			<style>
				.notices p{
					font-size:12px;color:#ddd;
				}
			</style>
        	<div class="notices">
    			<h2> Q 在小鱼回收进行门店和上门交易，需提前注意什么？<h2>
				<p>1.顾客需年满18岁；</p>
				<p>2.顾客在交易的时候，需提供中华人民共和国第二代居民身份证（护照和驾驶证等不可使用）；</p>
				<p>3.电子产品（手机、笔记本、平板等）在交易前请提前充好电。</p>
				<hr>
				<h2> Q 我提交订单的价格是不是最终成交价？<h2>
				<p>机器实际情况和提交信息一致，则会按照订单提交价格和您交易，目前我们97%的订单都是原价交易。 如果检测结果有差异，价格会有一定浮动，我们会主动联系您确认价格，若您不接受价格，小鱼回收会为您退回机器，并承担所有的快递费用。 同时网站为用户提供了一项贴心的服务：退回的机器网站免费提供快递保价服务。请您当着快递的面进行物品签收，若由于运输途中导致物品损坏请及时拍照拒收此包裹并联系快递客服和小鱼回收客服。</p>
				<hr>
				<h2>快递费是谁承担，标准是什么？</h2>
				<p>全国各地区小鱼回收最高承担40元运费，超额部分、保价费、包装费需由用户承担。</p>
				<hr/>
				<h2>订单提交后我从哪里可以查看到交易进度？</h2>
				<p>登陆订单中心或者关注小鱼回收网微信账号，随时查看处理进度，我们会及时更新订单状态。</p>
        	</div>
        	<div class="clear"></div>
        </div>
    </div>
	<div id="done">
		<div class="status">
			<div class="txt"></div><a href="/user/">查看我的回收订单</a>		
		</div>
		<div class="content">
			<ul class="tel">
				<li>请保持手机通讯畅通，我们的工作人员会尽快联系您。</li>				
				<li>联系电话：400-806-1518</li>
				<li><a href="/help/">帮助中心</a></li>
			</ul>
			<div class="code"><span>微信扫一扫<br/> 随时快速了解手机回收状态</span></div>
		</div>
	</div>
</div>
<div class="clearfix"></div>  
</div>


<tc_include file="Public:footer"/>
<tc_include file="Public:scripts"/>
<script>
$('#code').on('click',function(){
	var t = $('.mobile');
	get_mobile_code(t.val());
})
$('#fangshi span').on('click',function(){
		$(this).attr('class','active').siblings('.active').removeAttr('class');
		var way = $(this).attr('for');
		$("#"+way).show().siblings('.swap').hide();
});
$('#fk label').on('click',function(){
		$(this).attr('class','active').siblings('.active').removeAttr('class');
		var way = $(this).attr('for');
		$("#"+way).show().siblings('.payway').hide();
});
$("#shangmenform").on("submit",function(e){
	e.preventDefault();
	var t = $(this),
	a = t.find('.address'),
	n = t.find('.username'),
	r = t.find('.randcode'),
	m = t.find('.mobile');	
	
	if(!check_mobile(m.val())){
		EMI.alertDialog("请输入正确的手机号码!");
		return
	}
	
	if($.trim(n.val()).length == 0){
		EMI.alertDialog("请输入您的姓名!"); 
		return
	}
	
	if($.trim(a.val()).length == 0){
		EMI.alertDialog("请输入联系地址!");
		return
	}
	
	if($.trim(r.val()).length == 6){
		EMI.alertDialog("手机验证码输入错误!"); 
		return
	}

	$.post($(this).attr('action'),$(t).serializeArray(),function(msg){			
		if(msg.status == 1)
		{
			$("#order_form").fadeOut().hide();
			$("#done").fadeIn().show();	
		}
		else{EMI.alertDialog(msg.info);}
	})
});

$('#youjiform').on('submit',function(e){	
	e.preventDefault();
	var t = $(this),
	u = t.find('.username'),
	n = t.find('.mobile'),
	ac = t.find('.alicard'),
	an = t.find('.aliname'),
	uc = t.find('.unioncard'),
	un = t.find('.unionname');
	
	
	if($.trim(u.val()).length == 0){
		EMI.alertDialog("请输入您的姓名!"); 
		m(u.focus());return				
	}
	if(!check_mobile(n.val())){
		EMI.alertDialog("请输入正确的手机号码!"); 
		m(n.focus());return				
	}
	
	var objPay = new Object();
	if($('#fk').find('label.active').attr('for') == 'alipay'){

		if($.trim(ac.val()).length == 0){
			EMI.alertDialog("请输入支付宝账户!"); 
			m(ac.focus());return				
		}
		if($.trim(an.val()).length == 0){
			EMI.alertDialog("请输入支付宝真实姓名!"); 
			m(an.focus());return				
		}
		$('.pay_method').val('alipay');
	}
	else{
		if($.trim(uc.val()).length == 0){
			EMI.alertDialog("请输入网银账户!"); 
			m(uc.focus());return				
		}
		if($.trim(un.val()).length == 0){
			EMI.alertDialog("请输入网银账号!"); 
			m(un.focus());return				
		}
		$('.pay_method').val('unionpay');
	}

	$.post(t.attr('action'),t.serializeArray(),function(msg){
			if(msg.status == 1){
				$("#order_form").fadeOut().hide();
				$("#done").fadeIn().show();	
			}
			else{
				alert(msg.info);
			}
		}
	);
});
</script>

</body>
</html>